package com.dyz.leetcode._04_bitOperation;

public class _371_getSum {
    public int getSum(int a, int b) {
        while(b!=0){
            int carry = (a&b)<<1;//进位
            a = a ^ b; //不进位加法
            b = carry;
        }
        return a;
    }
}
